#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 5305;
const int MOD = 1e9 + 7;

ll f[11005];
int n, l, k;
int dp[5005][30][105];
ll d[5505];
void init(int n) {
  f[1] = 1;
  rep(i, 2, n) {
    int x = MOD / i, y = MOD % i;
    f[i] = MOD - 1ll * x * f[y] % MOD;
  }
}
void solve() {
  int n, real, fake;
  cin >> n >> real >> fake;
  rep(i, 0, real) rep(j, 0, fake) rep(k, 0, n) dp[i][j][k] = 0;
  rep(i, 1, real) {
    rep(j, 0, fake) {
      rep(k, 0, n + i + j + 1) d[k] = 0;
      ll p = i == 1 ? 0 : (i - 1) * f[i * 2 + j - 2] % MOD;
      rep(side, 0, 1) {
        ll prob = side == 0 ? p : (MOD + 1 - p) % MOD;
        ll x = prob * f[i + j] % MOD;
        int cnt = side == 0 ? i : i + j;
        d[1] += x;
        d[1 + cnt] -= x % MOD;
        rep(k, 1, n) {
          d[k + 1] += dp[i - 1][j][k] * x % MOD;
          d[k + 1 + cnt] -= dp[i - 1][j][k] * x % MOD;
        }
      }
      if (i != 1 && j) {
        ll x = p * j % MOD * f[i + j] % MOD;
        rep(k, 1, n) {
          int s = (k + i - 1) % n + 1;
          dp[i][j][s] = dp[i][j - 1][k] * x % MOD;
        }
      }
      rep(k, 1, n + i + j) {
        int s = (k - 1) % n + 1;
        d[k] = (d[k] + d[k - 1]) % MOD;
        dp[i][j][s] = (dp[i][j][s] + d[k] + MOD) % MOD;
      }
    }
  }
  rep(k, 1, n) cout << dp[real][fake][k] << ' ';
  cout << endl;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  init(11000);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}